package com.orange.powerdownload;

import com.orange.powerdownload.core.DownLoader;
import com.orange.powerdownload.util.LogUtils;
import lombok.extern.slf4j.Slf4j;

import java.util.Scanner;

/**
 * Description:多线程下载主类
 * https://dldir1.qq.com/qqfile/qq/QQNT/897bf087/QQ9.9.7.21484_x64.exe
 */
@Slf4j
public class Main {
    public static void main(String[] args) {
        //下载地址
        String url = null;
        for (; ; ) {
            System.out.println("请输入下载链接：");
            Scanner sc = new Scanner(System.in);
            url = sc.next();
            if (url != null) {
                break;
            }
        }
        LogUtils.info("下载链接地址为: {}", url);

        DownLoader downLoader = new DownLoader();
        downLoader.download(url);
    }
}
